package cn.school.attendance.dormitory.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

/**
 * @className: DormitoryStudentInfo
 * @author: Alex
 * @date: 2023/4/7
 **/
@Data
@TableName("t_dormitory_berth tdb " +
		"left join t_student_info tsi on tdb.use_student_id = tsi.id " +
		"left join t_school_class tcc on tsi.class_id = tcc.id " +
		"left join t_sys_user tsu on tcc.class_teacher_id = tsu.username and tdb.use_student_id != '' ")
public class DormitoryStudentInfo {
	
	@TableField(value = "tdb.id")
	private Long dormitoryId;
	
	@TableField(value = "tdb.use_student_id")
	private Long studentId;
	
	@TableField(value = "tdb.location_id")
	private Long locationId;
	
	@TableField(value = "tsi.class_id")
	private Long classId;
	
	@TableField(value = "tsi.certificate_id")
	private String certificateId;
	
	@TableField(value = "tsi.name")
	private String name;
	
	@TableField(value = "tsi.phone")
	private String phone;
	
	@TableField(value = "tsi.gender")
	private String gender;
	
	@TableField(value = "tsi.class_name")
	private String className;
	
	@TableField(value = "tcc.class_teacher_id")
	private String classTeacherId;

	@TableField(value = "tsu.phone")
	private String teacherPhone;
	
	@TableField(value = "tsi.guardian_name")
	private String guardianName;
	
	@TableField(value = "tsi.guardian_phone_number")
	private String guardianPhone;
	
	@TableField(value = "tsi.tenant_id")
	private Long tenantId;
	
	@TableField(exist = false)
	private String status;
	
	@TableField(exist = false)
	private String isNormal;
	
	@TableField(exist = false)
	private Long attendanceId;
	
	@TableField(exist = false)
	private String createTime;
	
	@TableField(exist = false)
	private String createBy;
	
	@TableField(exist = false)
	private String modifyTime;
	
	@TableField(exist = false)
	private String modifyBy;
}
